import Layout from '@/layout/Layout.vue'
import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'

export const routes: RouteRecordRaw[] = [
  {
    path: '/',
    redirect: '/css',
    component: Layout,
    children: [
      {
        path: 'css',
        meta: {
          title: '样式',
          icon: 'd',
        },
        component: () => import('@/views/css/index.vue'),
      },
      {
        path: 'req',
        meta: {
          title: '请求',
          icon: 'e',
        },
        component: () => import('@/views/req/index.vue'),
      },
      {
        path: 'com',
        meta: {
          title: '组件',
          icon: 'e',
        },
        component: () => import('@/views/com/index.vue'),
      },
    ],
  },

]
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
})

export default router
